#Contributor: Julian Weigt <juw@posteo.de>
#Maintainer: Julian Weigt <juw@posteo.de>
#taken from archlinux
pkgname=gammastep
pkgver=2.0.7
pkgrel=3
pkgdesc="Adjust the color temperature of your screen according to your surroundings"
arch="all"
url="https://gitlab.com/chinstrap/gammastep"
license="GPL-3.0-only"
makedepends="autoconf python3 intltool gettext-dev automake libtool wayland-dev geoclue-dev"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/chinstrap/gammastep/-/archive/v$pkgver/gammastep-v$pkgver.tar.gz"
subpackages="$pkgname-doc"

builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make -k check
}

package() {
	make DESTDIR="$pkgdir/" install
	install -vDm 644 CONTRIBUTING.md NEWS.md README.md -t "$pkgdir/usr/share/doc/$pkgname"
}
sha512sums="466811636d4c4d5f3fc21272e7ab8c208e2ad8830fbabd48c8d96c2eaa04d07c29da35f409166eaf95acdd0038f926a84d199fabf08df79fb027f45441ef0d08  gammastep-2.0.7.tar.gz"
